package com.theory.util;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "code.theory")
public class MyProperties implements InitializingBean {

    private String url;
    private String appcode;
    private int limit;


    public static String URL;
    public static String APPCODE;
    public static int LIMIT;


    @Override
    public void afterPropertiesSet() throws Exception {
        URL = url;
        APPCODE = appcode;
        LIMIT = limit;
    }
}
